public class DepartmentTest {

    public static void main(String[] args) {
         //创建对象并同时给对象赋值  调用的是构造方法
        Department dept1=new Department(1,"开发部","133333333");
        System.out.println(dept1);

        System.out.println("部门编号: "+dept1.getDid()+",部门名称："+dept1.getDname()+"，联系电话:"+dept1.getDtel()+"");

        Department dept2=new Department();
        dept2.setDid(2);
        dept2.setDname("测试部");
        dept2.setDtel("1666666666666");

        System.out.println(dept2);
    }
}
